function err = err_obj_func_ls(x)
  
    try 
        err = obj_func_ls(x) ;
    catch
        err = Inf ;
        model = NaN;
    end
end